package com.zbkj.front.controller.user;

import com.zbkj.common.response.GoodsLocationAllianceTypeResponse;
import com.zbkj.common.response.GoodsLocationResponse;
import com.zbkj.common.result.CommonResult;
import com.zbkj.service.service.CartService;
import com.zbkj.service.service.MerchantService;
import com.zbkj.service.service.SystemConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 家乡购控制器
 +----------------------------------------------------------------------
 */
@Slf4j
@RestController
@RequestMapping("api/front/goods/location")
@Api(tags = "家乡购控制器") //配合swagger使用
public class GoodsLocationController {

    @Autowired
    private SystemConfigService systemConfigService;

    @ApiOperation(value = "当前品牌商商户分类列表") //配合swagger使用
    @RequestMapping(value = "/merchant/category/list", method = RequestMethod.GET)
    public CommonResult<List<GoodsLocationResponse>> getMerchantCategoryList() {
        return CommonResult.success(systemConfigService.getGoodsLocationCategoryListH5());
    }

    @ApiOperation(value = "当前品牌商商户联盟类型列表") //配合swagger使用
    @RequestMapping(value = "/merchant/alliance-type/list", method = RequestMethod.GET)
    public CommonResult<List<GoodsLocationAllianceTypeResponse>> getMerchantAllianceTypeList() {
        return CommonResult.success(systemConfigService.getGoodsLocationAllianceTypeListH5());
    }

}



